<template>
  <div>
    <!-- <CollectPage2List :collect-id="666" :userId="666" :collectName="666"></CollectPage2List> -->
    <van-list
        :finished="finished"
        finished-text="没有更多了"
        @load="onLoad"
        >
        <CollectPage2List
        v-for="item in list"
        :key="item.collectId"
        :collectId="item.collectId"
        :userId="item.userId"
        :collectName="item.collectName">
      </CollectPage2List>
    </van-list>
  </div>
</template>

<script>
import CollectAPI from '@/api/CollectAPI'
import CollectPage2List from './CollectPage2List.vue'

export default {
  name: "CollectList",
  components: { CollectPage2List
   },
 

  data() {
    return {
      list: []
    }
  },
  created() {
 
        // 获取我的收藏夹列表
     {
      var result = CollectAPI.MyCollectList();
        // 获取返回结果
       result.then((val) => {
        console.log(val);
        if (val.success) {
            // 将数据存到list里面
            this.list = val.data;
        }
        else {
         console.log(val.errorMsg);
         this.$toast(val.errorMsg);
             }
      });
    }
  },
  methods:{


  }
}
</script>

<style>

</style>